home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 60.zip
/
BS1 part 60
/
Highspeed pascal.adf
/
Interface
/
Disk.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-01-16
|
1KB
|
69 lines
Unit Disk;
Interface
Uses Exec;
Type
pDiscResourceUnit = ^tDiscResourceUnit;
pLibrary = ^tLibrary;
tDiscResource = Record
dr_Library: tLibrary;
dr_Current: pDiscResourceUnit;
dr_Flags: ShortInt;
dr_pad: ShortInt;
dr_SysLib: pLibrary;
dr_CiaResource: pLibrary;
dr_UnitID: Array [0..3] of LongInt;
dr_Waiting: tList;
dr_DiscBlock: tInterrupt;
dr_DiscSync: tInterrupt;
dr_Index: tInterrupt;
End;
tDiscResourceUnit = Record
dru_Message: tMessage;
dru_DiscBlock: tInterrupt;
dru_DiscSync: tInterrupt;
dru_Index: tInterrupt;
End;
pDiscResource = ^tDiscResource;
Var
DiskBase: pDiscResource;
Const
DRB_ALLOC0 = $0;
DRB_ALLOC1 = $1;
DRB_ALLOC2 = $2;
DRB_ALLOC3 = $3;
DRF_ALLOC0 = $1;
DR_ALLOCUNIT = $FFFFFFFA;
DRF_ALLOC1 = $2;
DRF_ALLOC2 = $4;
DR_GETUNITID = $FFFFFFE2;
DRT_EMPTY = $FFFFFFFF;
DRF_ALLOC3 = $8;
DR_LASTCOMM = $FFFFFFE8;
DR_FREEUNIT = $FFFFFFF4;
DRB_ACTIVE = $7;
DSKDMAOFF = $4000;
DRF_ACTIVE = $80;
DR_GIVEUNIT = $FFFFFFE8;
DRT_AMIGA = $0;
DRT_37422D2S = $55555555;
DR_GETUNIT = $FFFFFFEE;
DISKNAME = 'disk.resource';
Function AllocUnit (unitNum: LongInt): Boolean;
Procedure FreeUnit (unitNum: LongInt);
Function GetUnit (unitPointer: pDiscResourceUnit): pDiscResourceUnit;
Procedure GiveUnit;
Function GetUnitID (unitNum: LongInt): LongInt;
End.